#ifndef MUSICFORM1_H
#define MUSICFORM1_H

#include <QWidget>
#include "head.h"
#include "customdelegete.h"

namespace Ui {
class MusicForm1;
}

class MusicForm1 : public QWidget
{
    Q_OBJECT

public:
    explicit MusicForm1(QWidget *parent = nullptr);
    ~MusicForm1();

    void loadFavoriteSongs();

public slots:
    void replyFinished(QNetworkReply *reply);
protected:
    void mouseDoubleClickEvent(QMouseEvent *event) override; // 声明鼠标双击事件

private:
    int getSongId(const QModelIndex &index); // 获取歌曲ID的辅助函数
private:
    Ui::MusicForm1 *ui;
     QStandardItemModel *pModelForm1;

     QList <int> misicIdListF1;    //存放音乐的id号
     QMediaPlaylist *playlistF1; //媒体播放器列表
     QMediaPlayer *playerF1 ;
     QNetworkAccessManager *managerF1;

};

#endif // MUSICFORM1_H
